<template>
  <div class="hello">
    <mt-button type="default" @click="alertToast()">Toast2</mt-button>
    <mt-button type="default" @click="showPopup()">Popup</mt-button>
    <mt-popup
      v-model="popupVisible"
      position="bottom"><p>更新成功</p>
    </mt-popup>
  </div>
</template>

<script>
  export default {
    name: 'HelloWorld',
    data() {
      return {
        msg: 'Welcome to Your Vue.js App',
        popupVisible: false
      }
    },
    mounted() {
      this.$http
        .get('http://localhost:3000/jouser/list')
        .then(res => {
          console.log(res)
        })
    },
    methods: {
      alertToast() {
        this.$Toast('Upload Complete')
      },
      showPopup() {
        this.popupVisible = true
      }
    }
  }
</script>

<style scoped>
</style>
